import { createRouter, createWebHistory } from 'vue-router'
import loginView from '../views/loginView.vue'
import homeView from '../views/homeView.vue'
import myView from '../views/myView.vue'
import communityView from '../views/communityView.vue'
import sportView from '../views/sportView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'login',
      component: loginView,
      meta:{
        isshowtabBar:false
      }
    },
    {
      path: '/home',
      name: 'home',
      component: homeView,
      meta:{
        isshowtabBar:true
      }
    },
    {
      path: '/my',
      name: 'my',
      component: myView,
      meta:{
        isshowtabBar:true
      }
    },
    {
      path: '/community',
      name: 'community',
      component: communityView,
      meta:{
        isshowtabBar:true
      }
    },
    {
      path: '/sport',
      name: 'sport',
      component: sportView,
      meta:{
        isshowtabBar:true
      }
    },
  ]
})

export default router
